import { getHttp, postHttp } from "..";

// 用户消费记录接口类型
export interface ConsumptionRecordParamsState {
  page: number;
  count: number;
}

// 充值参数类型
interface RechargeState {
  money: number;
  payType: number;
}

// 提现参数类型
interface DrawCashData {
  money: number;
}

// 提现记录参数
interface DrawRecordListParams {
  page: number;
  count: number;
}
// 查询问诊医生列表参数
export interface DoctorListParamsState {
  deptId: number; //科室id
  condition: number; //条件 //1=综合，2=好评 ，3=咨询数 ，4= 价格
  sortBy: number; // 排序非必须参数 // 当条件为4时，1=按高价格排序，不传为默认排序
  page: number;
  count: number;
}

// 我的钱包接口
export const getUserWallet = () =>
  getHttp("/health/user/verify/v1/findUserWallet");
// 查询用户消费记录接口
export const getRecordList = (params: ConsumptionRecordParamsState) =>
  getHttp("/health/user/verify/v1/findUserConsumptionRecordList", params);

// 充值接口
export const postRecharge = (data: RechargeState) =>
  postHttp("/health/user/verify/v1/recharge", data);

// 提现接口
export const postDrawCash = (data: DrawCashData) =>
  postHttp("/health/user/verify/v1/drawCash", data);
//提现记录接口
export const getDrawRecordList = (params: DrawRecordListParams) =>
  getHttp("/health/user/verify/v1/findUserDrawRecordList", params);

// 查询问诊医生列表
export const getDoctorList = (params: DoctorListParamsState) =>
  getHttp("/health/user/inquiry/v1/findDoctorList", params);
